package com.vhall.component.controller.data.facade;

import com.vhall.component.entity.data.vo.*;
import com.vhall.component.entity.page.vo.PageVO;
import com.vhall.component.entity.tag.vo.PageChannelListRspVO;
import com.vhall.component.plugin.common.annotation.TokenAuth;
import com.vhall.component.plugin.common.annotation.VssTokenAuth;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * 数据
 *
 * @author guoxin.wang
 * @date 2021-06-18 13:37
 */
@FeignClient(value = "DataFacade", path = "/v4/datacenter")
public interface DataFacade {

    /**
     * 获取基本配置信息，有人员查询条件
     *
     * @param reqVO
     * @return
     */
    @GetMapping(value = "/get-basic-statistics-info")
    BasicStatisticsInfoVO getBasicStatisticsInfo(UserParamVO reqVO);

    /**
     * 获取设备信息
     *
     * @param reqVO
     * @return
     */
    @GetMapping(value = "/get-device-info")
    List<UserDeviceRspVO> getDeviceInfo(UserParamVO reqVO);

    /**
     * 获取...信息
     *
     * @param reqVO
     * @return
     */
    @GetMapping(value = "/get-province-info")
    List<UserProvinceRspVO> getProvinceInfo(UserParamVO reqVO);

    /**
     * 获取uv信息
     *
     * @param reqVO
     * @return
     */
    @GetMapping(value = "/get-user-watch-uv-info")
    List<UserLiveWatchUvRspVO> getUserWatchUvInfo(UserParamVO reqVO);

    /**
     * 获取pv信息
     *
     * @param reqVO
     * @return
     */
    @GetMapping(value = "/get-user-watch-pv-info")
    List<UserWatchPvRspVO> getUserWatchPvInfo(UserParamVO reqVO);


    /**
     * 统计--直播中观看人数 及 人均观看时长（分）
     */
    @TokenAuth
    @PostMapping(value = "/num_of_viewers_and_other_info")
    NumOfViewersAndOtherInfoRspVO numOfViewersAndOtherInfo(@Validated UserParamVO reqVO);

    /**
     * 作废-直播观看数据（按频道）
     */
    @Deprecated
    @PostMapping(value = "/dp-channel-avg-view-duration")
    List<PageChannelListRspVO> getDpChannelAvgViewDuration(@Validated UserParamVO reqVO);

    /**
     * 作废-直播观看数据（按讲师）
     */
    @Deprecated
    @PostMapping(value = "/dp-lecturer-avg-view-duration")
    List<DpLecturerAvgViewDurationRspVO> getDpLecturerAvgViewDuration(@Validated UserParamVO reqVO);

    /**
     * 直播观看数据-按栏目
     * @param reqVO
     * @return
     */
    @TokenAuth
    @GetMapping ("/dp-column-live-view-data")
    PageVO<DpLiveViewDataResponseVO> getDpColumnLiveViewData(@Validated UserParamVO reqVO);

    /**
     * 直播观看数据-按主播
     * @param reqVO
     * @return
     */
    @TokenAuth
    @GetMapping ("/dp-anchor-live-view-data")
    PageVO<DpLiveViewDataResponseVO> getDpAnchorLiveViewData(@Validated UserParamVO reqVO);

    /**
     * 观看时段top
     */
    @TokenAuth
    @PostMapping(value = "/dp-watch-time-top")
    List<DpWatchTimeTopRspVO> getDpWatchTimeTop(@Validated UserParamVO reqVO);

    /**
     * 用户观看时长分布
     */
    @TokenAuth
    @PostMapping(value = "/dp-user-view-duration-distribution")
    List<UserViewDurationDistributionRspVO> getDpUserViewDurationDistribution(@Validated UserParamVO reqVO);

    /**
     * pv记录
     */
    @VssTokenAuth
    @PostMapping(value = "/record_viewing_info")
    Long recordViewingInfo(@Validated RecordViewingInfoVO reqVO);

    /**
     * 播放量趋势
     */
    @PostMapping(value = "/play_volume_trend")
    List<PlayVolumeTrendRspVO> playVolumeTrend(@Validated UserParamVO reqVO);
    /**
     * 获取可选择下拉时间区间选项 list
     * @return
     */
    @GetMapping("/select_time_interval_options")
    List<SelectTimeIntervalOptionsVO> getSelectTimeIntervalOptions();
}
